#surveyor
  - unless (types = flash.keys.select{|k| [:notice, :error, :warning].include?(k)}).blank?
    .surveyor_flash
      = flash_messages(types)
      .close
  .survey_title= t('surveyor.take_these_surveys')
  %br
  #survey_list
    %ul
      - @surveys_by_access_code.each do |access_code, surveys|
        %li
          = form_tag surveyor.take_survey_path(:survey_code => access_code) do
            = hidden_field_tag :surveyor_javascript_enabled, false
            = surveys.first.translation(I18n.locale)[:title]
            &nbsp;
            = label_tag :survey_version, 'version:'
            = select_tag(:survey_version, options_for_select([["-- Current version --", ""]] + (surveys.map(&:survey_version) || [])))
            &nbsp;
            = submit_tag( t('surveyor.take_it'), :default => "Take it" )

:javascript
  $(document).ready(function() {
    $("input#surveyor_javascript_enabled").val(true);
  });